﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Swashbuckle.AspNetCore.Annotations;

namespace Model
{
    /**
     * 学校
     */
    [Serializable]
    [Table("School")]
    public class School : ID, IUser,ISchool//实现接口避免循环引用
    {
        /// <summary>
        /// 所属学校id，系统自动赋值
        /// </summary>
        [SwaggerSchema(ReadOnly = true)]
        public int? SchoolId { get; set; }
        /// <summary>
        /// 添加此记录的用户id，系统自动赋值
        /// </summary>
        [SwaggerSchema(ReadOnly = true)]
        public int? UserId { get; set; }

        [Display(Name = "名称")]
        [Required(ErrorMessage = "名称必填")]
        public string Name { get; set; }
        public string Pic { get; set; }
        [Display(Name = "简介")]
        public string Intro { get; set; }
    }
}